package com.rongji.dfish.base.crypt;

import com.rongji.dfish.base.crypt.CryptFactory;
import com.rongji.dfish.base.crypt.StringCryptor;

public class ITASK5PassEncrypt {
	public static void main(String[] args){
		StringCryptor sc=CryptFactory.getStringCryptor(CryptFactory.SHA512, CryptFactory.UTF8, CryptFactory.HEX_STRING);
		String en=sc.encrypt("meiyoumima");
		System.out.println("en="+en);
	}
	 public static void main2(String[] args) throws Exception {
		    RSAKeyGenerator gen = new RSAKeyGenerator();
		    gen.generate(1024, 64);
		    System.out.println("privateKey=" + gen.getPrivateKey());
		    System.out.println("modulus=" + gen.getModulus());
		    System.out.println("publicKey=" + gen.getPublicKey());
		  }
}
